package com.bee.bootstrap;

import com.bee.bootstrap.config.WebConfiguration;
import com.bee.common.config.TransactionConfig;
import com.bee.common.core.jsonview.JsonViewSupportFactoryBean;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

import com.bee.common.config.MongoDataSourceConfig;
import com.bee.common.config.MybatisPlusConfig;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;

@SpringBootApplication
@Import({MybatisPlusConfig.class,MongoDataSourceConfig.class,TransactionConfig.class,
		WebConfiguration.class})
public class BootStrapApplication {

	public static void main(String[] args) {
		SpringApplication.run(BootStrapApplication.class, args);
	}

	@Bean
	public MethodValidationPostProcessor getBean(){
		return new MethodValidationPostProcessor();
	}

	@Bean
	public JsonViewSupportFactoryBean jsonViewSupportFactoryBean(){
		return new JsonViewSupportFactoryBean();
	}
	
}
